<template>
  <MainLayout title="检验批标准">
    <view class="section">
      <view class="item" v-for="s in standards" :key="s.id" @click="preview(s)">
        <view class="name">{{ s.name }}</view>
        <view class="meta">{{ s.code }}</view>
      </view>
    </view>
  </MainLayout>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import MainLayout from '@/layouts/MainLayout.vue'

const standards = ref<{id:number;name:string;code:string}[]>([])
onMounted(()=>{
  standards.value = [
    { id: 1, name: '混凝土工程施工质量验收规范', code: 'GB 50204-2015' },
    { id: 2, name: '砌体结构工程施工质量验收规范', code: 'GB 50203-2011' },
  ]
})

function preview(s:any){
  uni.showToast({ title: `预览：${s.name}`, icon: 'none' })
}
</script>

<style scoped>
.section{ padding: 24rpx; }
.item{ background:#fff; padding: 24rpx; border-radius: 12rpx; margin-bottom: 16rpx; }
.name{ font-weight: 700; }
.meta{ color:#888; font-size: 24rpx; margin-top: 6rpx; }
</style>
